package com.hyg.lib_common.DataModel.report;

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;

/**
 * @author: Administrator
 * @date: 2020/12/24
 */
public class V2ReportListDetailData implements Parcelable {

    public V2ReportListDetailData() {
    }

    public int id;
    /**
     * 用户年龄
     */
    public int age;
    /**
     * 报告编号
     */

    public String barcode;
    /**
     * 报告产生日期
     */
    public String reportDate;
    /**
     * 性别0-无性、1-男性、2-女性
     */
    public int gender;
    /**
     * 报告状态0创建1做了任意检测2已诊断
     */
    public int reportStatus;
    /**
     * 诊断医师id
     */
    public int doctorId;
    /**
     * 医师诊断结论
     */
    public String diagnosisResults;

    public int userId;

    public String userName;

    public String userPhone;


    public String OrgName;

    protected V2ReportListDetailData(Parcel in) {
        id = in.readInt();
        age = in.readInt();
        barcode = in.readString();
        reportDate = in.readString();
        gender = in.readInt();
        reportStatus = in.readInt();
        doctorId = in.readInt();
        diagnosisResults = in.readString();
        userId = in.readInt();
        userName = in.readString();
        userPhone = in.readString();
        OrgName = in.readString();
        if (in.readByte() == 0) {
            tongueId = null;
        } else {
            tongueId = in.readLong();
        }
        if (in.readByte() == 0) {
            pulseId = null;
        } else {
            pulseId = in.readLong();
        }
        if (in.readByte() == 0) {
            tiZhiId = null;
        } else {
            tiZhiId = in.readLong();
        }
        if (in.readByte() == 0) {
            zhengXingId = null;
        } else {
            zhengXingId = in.readLong();
        }
        if (in.readByte() == 0) {
            qingZhiId = null;
        } else {
            qingZhiId = in.readLong();
        }
        if (in.readByte() == 0) {
            adviceId = null;
        } else {
            adviceId = in.readLong();
        }
        orgId = in.readInt();
        payType = in.readInt();
        if (in.readByte() == 0) {
            erXueId = null;
        } else {
            erXueId = in.readLong();
        }
        if (in.readByte() == 0) {
            ownerAdviceId = null;
        } else {
            ownerAdviceId = in.readLong();
        }
        if (in.readByte() == 0) {
            tiXueId = null;
        } else {
            tiXueId = in.readLong();
        }
        isDelete = in.readInt();
        createTime = in.readString();
        updateTime = in.readString();
        if (in.readByte() == 0) {
            createUserId = null;
        } else {
            createUserId = in.readLong();
        }
        if (in.readByte() == 0) {
            updateUserId = null;
        } else {
            updateUserId = in.readLong();
        }
        dataVersion = in.readString();
        dataFromDevice = in.readString();
        extendJsonData = in.readString();
        ysIdJson = in.readString();
    }

    public static final Creator<V2ReportListDetailData> CREATOR = new Creator<V2ReportListDetailData>() {
        @Override
        public V2ReportListDetailData createFromParcel(Parcel in) {
            return new V2ReportListDetailData(in);
        }

        @Override
        public V2ReportListDetailData[] newArray(int size) {
            return new V2ReportListDetailData[size];
        }
    };

    public String getOrgName() {
        return OrgName;
    }

    public void setOrgName(String orgName) {
        OrgName = orgName;
    }

    /**
     * 望诊id
     */
    public Long tongueId;
    /**
     * 脉诊id
     */
    public Long pulseId;
    /**
     * 体质id
     */
    public Long tiZhiId;
    /**
     * 证型id
     */
    public Long zhengXingId;
    /**
     * 情志id
     */
    public Long qingZhiId;
    /**
     * 养生建议id
     */
    public Long adviceId;
    /**
     * 体检机构id
     */
    public int orgId;
    /**
     * 支付方式
     */
    public int payType;
    /**
     * 耳穴id
     */
    public Long erXueId;
    /**
     * 大四诊养生id
     */
    public Long ownerAdviceId;
    /**
     * 体穴id
     */
    public Long tiXueId;
    /**
     * 是否删除0否、1是
     */
    public int isDelete;
    /**
     * 创建时间
     */
    public String createTime;
    /**
     * 更新时间
     */
    public String updateTime;
    /**
     * 创建用户id
     */
    public Long createUserId;
    /**
     * 更新用户id
     */
    public Long updateUserId;
    /**
     * 数据版本号
     */

    public String dataVersion;
    /**
     * 数据来源设备
     */

    public String dataFromDevice;
    /**
     * 备用扩展JSON
     */
    public String extendJsonData;

    public String ysIdJson;


    public String getYsIdJson() {
        return ysIdJson;
    }

    public void setYsIdJson(String ysIdJson) {
        this.ysIdJson = ysIdJson;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getReportDate() {
        return reportDate;
    }

    public void setReportDate(String reportDate) {
        this.reportDate = reportDate;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public int getReportStatus() {
        return reportStatus;
    }

    public void setReportStatus(int reportStatus) {
        this.reportStatus = reportStatus;
    }

    public int getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(int doctorId) {
        this.doctorId = doctorId;
    }

    public String getDiagnosisResults() {
        return diagnosisResults;
    }

    public void setDiagnosisResults(String diagnosisResults) {
        this.diagnosisResults = diagnosisResults;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public Long getTongueId() {
        return tongueId;
    }

    public void setTongueId(Long tongueId) {
        this.tongueId = tongueId;
    }

    public Long getPulseId() {
        return pulseId;
    }

    public void setPulseId(Long pulseId) {
        this.pulseId = pulseId;
    }

    public Long getTiZhiId() {
        return tiZhiId;
    }

    public void setTiZhiId(Long tiZhiId) {
        this.tiZhiId = tiZhiId;
    }

    public Long getZhengXingId() {
        return zhengXingId;
    }

    public void setZhengXingId(Long zhengXingId) {
        this.zhengXingId = zhengXingId;
    }

    public Long getQingZhiId() {
        return qingZhiId;
    }

    public void setQingZhiId(Long qingZhiId) {
        this.qingZhiId = qingZhiId;
    }

    public Long getAdviceId() {
        return adviceId;
    }

    public void setAdviceId(Long adviceId) {
        this.adviceId = adviceId;
    }

    public int getOrgId() {
        return orgId;
    }

    public void setOrgId(int orgId) {
        this.orgId = orgId;
    }

    public int getPayType() {
        return payType;
    }

    public void setPayType(int payType) {
        this.payType = payType;
    }

    public Long getErXueId() {
        return erXueId;
    }

    public void setErXueId(Long erXueId) {
        this.erXueId = erXueId;
    }

    public Long getOwnerAdviceId() {
        return ownerAdviceId;
    }

    public void setOwnerAdviceId(Long ownerAdviceId) {
        this.ownerAdviceId = ownerAdviceId;
    }

    public Long getTiXueId() {
        return tiXueId;
    }

    public void setTiXueId(Long tiXueId) {
        this.tiXueId = tiXueId;
    }

    public int getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(int isDelete) {
        this.isDelete = isDelete;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public String getDataVersion() {
        if (TextUtils.isEmpty(dataVersion)) {
            dataVersion = "2.0";
        }
        return dataVersion;
    }

    public void setDataVersion(String dataVersion) {
        this.dataVersion = dataVersion;
    }

    public String getDataFromDevice() {
        return dataFromDevice;
    }

    public void setDataFromDevice(String dataFromDevice) {
        this.dataFromDevice = dataFromDevice;
    }

    public String getExtendJsonData() {
        return extendJsonData;
    }

    public void setExtendJsonData(String extendJsonData) {
        this.extendJsonData = extendJsonData;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeInt(age);
        dest.writeString(barcode);
        dest.writeString(reportDate);
        dest.writeInt(gender);
        dest.writeInt(reportStatus);
        dest.writeInt(doctorId);
        dest.writeString(diagnosisResults);
        dest.writeInt(userId);
        dest.writeString(userName);
        dest.writeString(userPhone);
        dest.writeString(OrgName);
        if (tongueId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(tongueId);
        }
        if (pulseId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(pulseId);
        }
        if (tiZhiId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(tiZhiId);
        }
        if (zhengXingId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(zhengXingId);
        }
        if (qingZhiId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(qingZhiId);
        }
        if (adviceId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(adviceId);
        }
        dest.writeInt(orgId);
        dest.writeInt(payType);
        if (erXueId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(erXueId);
        }
        if (ownerAdviceId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(ownerAdviceId);
        }
        if (tiXueId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(tiXueId);
        }
        dest.writeInt(isDelete);
        dest.writeString(createTime);
        dest.writeString(updateTime);
        if (createUserId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(createUserId);
        }
        if (updateUserId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(updateUserId);
        }
        dest.writeString(dataVersion);
        dest.writeString(dataFromDevice);
        dest.writeString(extendJsonData);
        dest.writeString(ysIdJson);
    }


    @Override
    public String toString() {
        return "V2ReportListDetailData{" +
                "id=" + id +
                ", age=" + age +
                ", barcode='" + barcode + '\'' +
                ", reportDate='" + reportDate + '\'' +
                ", gender=" + gender +
                ", reportStatus=" + reportStatus +
                ", doctorId=" + doctorId +
                ", diagnosisResults='" + diagnosisResults + '\'' +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", userPhone='" + userPhone + '\'' +
                ", OrgName='" + OrgName + '\'' +
                ", tongueId=" + tongueId +
                ", pulseId=" + pulseId +
                ", tiZhiId=" + tiZhiId +
                ", zhengXingId=" + zhengXingId +
                ", qingZhiId=" + qingZhiId +
                ", adviceId=" + adviceId +
                ", orgId=" + orgId +
                ", payType=" + payType +
                ", erXueId=" + erXueId +
                ", ownerAdviceId=" + ownerAdviceId +
                ", tiXueId=" + tiXueId +
                ", isDelete=" + isDelete +
                ", createTime='" + createTime + '\'' +
                ", updateTime='" + updateTime + '\'' +
                ", createUserId=" + createUserId +
                ", updateUserId=" + updateUserId +
                ", dataVersion='" + dataVersion + '\'' +
                ", dataFromDevice='" + dataFromDevice + '\'' +
                ", extendJsonData='" + extendJsonData + '\'' +
                ", ysIdJson='" + ysIdJson + '\'' +
                '}';
    }
}
